package com.qfedu.buy.server.controller;

import com.qfedu.buy.common.dto.GoodsSkuDetailDto;
import com.qfedu.buy.server.service.intf.GoodsSkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: NeighborBuy
 * @description:
 * @author: Feri(邢朋辉)
 * @create: 2021-02-04 09:40
 */
@RestController
@RequestMapping("/server/goodssku/")
public class GoodsSkuController {
    @Autowired
    private GoodsSkuService skuService;
    @GetMapping("getgoodssku.do")
    public GoodsSkuDetailDto queryById(@RequestParam int id){
        return skuService.queryById(id);
    }
    @PutMapping("changestore.do")
    public int change(@RequestParam int id,@RequestParam int num){
        return skuService.changeStore(id, num);
    }
}
